package com.woniuxy.cloud.carl.order.app.consumer;

import com.woniuxy.cloud.carl.order.infra.model.Order;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(consumerGroup = "log",topic = "order_log")
public class OrderLogConsumer implements RocketMQListener<Order> {
    @Override
    public void onMessage(Order order) {
        System.out.println(order.getOrderNum());
        System.out.println(order.getOrderId());
    }
}
